Introduction: Diabetes mellitus is a chronic disease, it’s prevalence is very high and is increasing recently. In this study, in addition to determining type II diabetes related factors, we compared the Generalized linear and Generalized linear mixed models.Methods: Data is related to research project to investigate the epidemiological characteristics of diabetes in adults aged 30 years and older in the province of Yazd. In this study, 2, 795 people were screened with a blood glucose test for diabetes. We for data analysis by the mixed logistic and ordinary logistic regression used the R software.Results: In this study, four variables of family history of diabetes, age, body mass index and waist circumference to hip circumference were significant in both models (p-value<.001).Job was a significant variable in the ordinary logistic regression model in level significant.1 but not significant in the mixed logistic regression model. The education, area of housing and gender not significant in neither logistic mixed model nor ordinary logistic model. According to the values of the odds ratio also, we saw quite differences between the two models. Judging from standard error of the coefficients and comparison of the their values in both models seen underestimate in ordinary logistic regression model.Conclusion: The use of Generalized linear mixed models lead to more accurate results and prevents underestimated standard error of the coefficients.